package com.mafeifan

// 实现 Serializable 接口是为了确保当 pipeline 被 Jenkins挂起后能正确恢复
class Utils implements Serializable {
    def createVersion(String BUILD_NUMBER) {
        return new Date().format('yyyy-MM-dd') + "-${BUILD_NUMBER}"
    }

    def message(stageName) {
        def msg = new BuildMessage()
        def stage = stageName + '-build'
        msg.updateBuildMessage('', "${stage} OK...  √")
        return msg
    }
}
